package com.neusoft.demo3;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        double money = input.nextDouble();
        int extra = 0; //换购付款
        int choice = 0;//选项
        if(money >= 50) {
            System.out.println("是否参加活动");
            System.out.println("1.满50元加2元换购商品A");
            System.out.println("2.满100元加3元换购商品B");
            System.out.println("3.满100元加10元换购商品C");
            System.out.println("4.满200元加10元换购商品D");
            System.out.println("5.满200元加20元换购商品E");
            System.out.println("0.不换购");
            //选择菜单
            System.out.println("请选择：");
            choice =  input.nextInt();
            switch (choice) {
                case 1:
                    if(money >= 50){
                        extra = 2;
                    }
                    break;
                case 2:
                    if(money >= 100){
                        extra = 3;
                    }
                    break;
                case 3:
                    if(money >= 100){
                        extra = 10;
                    }
                    break;
                case 4:
                    if(money >= 200){
                        extra = 10;
                    }
                    break;
                case 5:
                    if(money >= 200){
                        extra = 20;
                    }
                    break;
                default:
                    break;
            }
        }else {
            System.out.println("不满足换购条件");
        }
        //计算总金额
        double total = money + extra;
        System.out.println("本次消费总金额"+total);
        if(choice == 1) {
            System.out.println("换购商品A");
        }else if(choice==2) {
            System.out.println("换购商品B");
        }

    }
}
